package com.server.pinggu.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.server.pinggu.mapper.SenVarsMapper;
import com.server.pinggu.domain.SenVars;
import com.server.pinggu.service.ISenVarsService;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ltao
 * @date 2022-10-23
 */
@Service
public class SenVarsServiceImpl extends ServiceImpl<SenVarsMapper, SenVars> implements ISenVarsService {

    @Override
    public List<SenVars> queryList(SenVars senVars) {
        LambdaQueryWrapper<SenVars> lqw = Wrappers.lambdaQuery();
        if (StringUtils.isNotBlank(senVars.getName())){
            lqw.like(SenVars::getName ,senVars.getName());
        }
        if (StringUtils.isNotBlank(senVars.getTag())){
            lqw.eq(SenVars::getTag ,senVars.getTag());
        }
        if (StringUtils.isNotBlank(senVars.getCont())){
            lqw.eq(SenVars::getCont ,senVars.getCont());
        }
        return this.list(lqw);
    }
}